<template>
  <div>
    <el-row :gutter="20">
      <el-col :span="12">
        <div class="left">
          <div>
            <el-tag effect="dark">标准答案</el-tag>
            <!-- <span>输入句子</span> -->
            <el-input v-model="stans"></el-input>
          </div>

          <div v-for="(item,index) in list" :key="index" class="ans">
            <el-tag effect="dark" size="medium" class="user">{{item.tit}}</el-tag>
            <!-- <span>输入句子</span> -->
            <el-input v-model="item.content"></el-input>
          </div>
        </div>
        <el-button type="danger" class="sub" @click="submit()">确认提交</el-button>
      </el-col>
      <el-col :span="12" class="right">
        <span class="tit">分值</span>
        <span class="tit titl">得分点</span>

        <div class="result">
          <div v-for="(item,index) in result" :key="index" class="all">
            <span class="rightspan">{{item.score}}</span>
            <span>{{item.key}}</span>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [
        {
          tit: '用户回答1',
          content: ''
        },
        {
          tit: '用户回答2',
          content: ''
        },
        {
          tit: '用户回答3',
          content: ''
        },
        {
          tit: '用户回答4',
          content: ''
        },
        {
          tit: '用户回答5',
          content: ''
        },
        {
          tit: '用户回答6',
          content: ''
        }
      ],
      result: [
        {
          score: null,
          key: ''
        },
        {
          score: null,
          key: ''
        },
        {
          score: null,
          key: ''
        },
        {
          score: null,
          key: ''
        },
        {
          score: null,
          key: ''
        },
        {
          score: null,
          key: ''
        }
      ],
      stans: ''
    }
  },
  methods: {
    submit() {
      this.result = [
        {
          score: 0,
          key: '无'
        },
        {
          score: 2,
          key: '垛距'
        },
        {
          score: 4,
          key: '垛距,柱'
        },
        {
          score: 6,
          key: '垛距,柱,顶距'
        },
        {
          score: 8,
          key: '顶距,灯距,柱,垛距'
        },
        {
          score: 10,
          key: '顶距,灯距,柱,墙距,垛距'
        }
      ]
    }
  }
}
</script>

<style lang="less" scoped>
.rightspan {
    display: inline-block;
    width: 140px;
}

.sub {
  margin-top: 15px;
  margin-left: 180px;
}

.right {
  margin-top: 55px;
}

.tit {
  color: #30b42f;
  font-weight: 1000;
  font-size: 20px;
}

.titl {
  margin-left: 120px;
}

.left {
  margin-top: 20px;
  div {
    display: flex;
    margin-bottom: 10px;
  }
  .el-tag {
    height: 60px;
    line-height: 55px;
    background: #1c4faa;
    width: 100px;
    text-align: center;
    border: none;
  }

  .ans {
    .el-tag {
      background: #f55d54;
    }
    /deep/ .el-input__inner {
      background-color: #fab5b1;
    }
  }

  /deep/ .el-input__inner {
    background-color: #c2cfe7;
    height: 60px;
  }
  // span {
  //   white-space: nowrap;
  //   margin-top: 9px;
  //   margin-right: 15px;
  // }
}

.result {
  background: #e8f4e8;
  height: 440px;
  margin-top: 20px;
  span {
    font-size: 16px;
    color: #30b42f;
    font-weight: 700;
    letter-spacing: 1px;
    margin-left: 8px;
  }
  padding-top: 20px;
}

.all {
  margin: 0px 0px 60px 8px;
}
</style>